package com.credithc.customers.manager.mapper;

import com.credithc.customers.base.po.CustomerIdInfoPo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author zhukai
 * @date 2018/12/17 17:41
 */
@Mapper
@Repository
public interface BizMonitorMapper {
    @Select({
            "<script>",
            "select",
            "A.id, A.remark, A.create_time createTime,A.customer_no customerNo,A.customer_property customerProperty," ,
            "A.customer_name customerName,A.id_card_type idCardType,A.id_card_no idCardNo,A.elements_verified elementsVerified," ,
            "A.elements_time elementsTime,B.sub_system_sign subSystemSign,A.update_time updateTime",
            "from cust_id_info A JOIN cust_manage_info B ON A.customer_no = B.customer_no",
            "where A.id in",
            "<foreach collection='ids' item='id' open='(' separator=',' close=')'>",
            "#{id}",
            "</foreach>",
            "</script>"
    })
    List<CustomerIdInfoPo> getAbnormalInfo(@Param("ids") List<String> ids);

}
